import 'package:flutter/cupertino.dart';
import 'package:wch/generated/json/base/json_field.dart';
import 'dart:convert';

import '../generated/json/patient_edit.g.dart';

@JsonSerializable()
class PatientEditModel {
	int? id;
	int? hospitalId;
	int? doctorId;
	int? templateId;
	String? doctorName;
	dynamic text;
	List<PatientEditList>? list;
	String? isDelete;
	String? createTime;
	String? updateTime;

	PatientEditModel();

	factory PatientEditModel.fromJson(Map<String, dynamic> json) => $PatientEditModelFromJson(json);

	Map<String, dynamic> toJson() => $PatientEditModelToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class PatientEditList {
	int? id;
	int? sickPersonId;
	int? templateItemId;
	int? doctorId;
	String? name;
	String? text;
	int? type;
	String? label;
	String? status;
	int? sort;
	///辅助属性
	TextEditingController? controller;

	PatientEditList();

	factory PatientEditList.fromJson(Map<String, dynamic> json) => $PatientEditListFromJson(json);

	Map<String, dynamic> toJson() => $PatientEditListToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}